Integrand size = 21, antiderivative size = 179 \[ \int \frac {\tan ^7(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {\log (\cos (c+d x))}{a^2 d}+\frac {\left (a^2-b^2\right )^2 \left (5 a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2 b^6 d}-\frac {2 a \left (2 a^2-3 b^2\right ) \sec (c+d x)}{b^5 d}+\frac {3 \left (a^2-b^2\right ) \sec ^2(c+d x)}{2 b^4 d}-\frac {2 a \sec ^3(c+d x)}{3 b^3 d}+\frac {\sec ^4(c+d x)}{4 b^2 d}+\frac {\left (a^2-b^2\right )^3}{a b^6 d (a+b \sec (c+d x))} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3970, 908} \[ \int \frac {\tan ^7(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {\left (a^2-b^2\right )^3}{a b^6 d (a+b \sec (c+d x))}+\frac {\left (a^2-b^2\right )^2 \left (5 a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2 b^6 d}-\frac {2 a \left (2 a^2-3 b^2\right ) \sec (c+d x)}{b^5 d}+\frac {3 \left (a^2-b^2\right ) \sec ^2(c+d x)}{2 b^4 d}+\frac {\log (\cos (c+d x))}{a^2 d}-\frac {2 a \sec ^3(c+d x)}{3 b^3 d}+\frac {\sec ^4(c+d x)}{4 b^2 d} \]
[In]
[Out]
Rule 908
Rule 3970
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (b^2-x^2\right )^3}{x (a+x)^2} \, dx,x,b \sec (c+d x)\right )}{b^6 d} \\ & = -\frac {\text {Subst}\left (\int \left (2 \left (2 a^3-3 a b^2\right )+\frac {b^6}{a^2 x}-3 \left (a^2-b^2\right ) x+2 a x^2-x^3+\frac {\left (a^2-b^2\right )^3}{a (a+x)^2}-\frac {\left (a^2-b^2\right )^2 \left (5 a^2+b^2\right )}{a^2 (a+x)}\right ) \, dx,x,b \sec (c+d x)\right )}{b^6 d} \\ & = \frac {\log (\cos (c+d x))}{a^2 d}+\frac {\left (a^2-b^2\right )^2 \left (5 a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2 b^6 d}-\frac {2 a \left (2 a^2-3 b^2\right ) \sec (c+d x)}{b^5 d}+\frac {3 \left (a^2-b^2\right ) \sec ^2(c+d x)}{2 b^4 d}-\frac {2 a \sec ^3(c+d x)}{3 b^3 d}+\frac {\sec ^4(c+d x)}{4 b^2 d}+\frac {\left (a^2-b^2\right )^3}{a b^6 d (a+b \sec (c+d x))} \\ \end{align*}
Time = 1.51 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.91 \[ \int \frac {\tan ^7(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {-\frac {b^6 \log (\cos (c+d x))}{a^2}-\frac {\left (a^2-b^2\right )^2 \left (5 a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2}+2 a b \left (2 a^2-3 b^2\right ) \sec (c+d x)-\frac {3}{2} (a-b) b^2 (a+b) \sec ^2(c+d x)+\frac {2}{3} a b^3 \sec ^3(c+d x)-\frac {1}{4} b^4 \sec ^4(c+d x)-\frac {\left (a^2-b^2\right )^3}{a (a+b \sec (c+d x))}}{b^6 d} \]
[In]
[Out]
Time = 2.54 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.12
method | result | size |
derivativedivides | \(\frac {-\frac {a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}{a^{2} b^{5} \left (b +a \cos \left (d x +c \right )\right )}+\frac {\left (5 a^{6}-9 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{b^{6} a^{2}}-\frac {-3 a^{2}+3 b^{2}}{2 b^{4} \cos \left (d x +c \right )^{2}}+\frac {\left (-5 a^{4}+9 a^{2} b^{2}-3 b^{4}\right ) \ln \left (\cos \left (d x +c \right )\right )}{b^{6}}+\frac {1}{4 b^{2} \cos \left (d x +c \right )^{4}}-\frac {2 a}{3 b^{3} \cos \left (d x +c \right )^{3}}-\frac {2 a \left (2 a^{2}-3 b^{2}\right )}{b^{5} \cos \left (d x +c \right )}}{d}\) | \(200\) |
default | \(\frac {-\frac {a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}{a^{2} b^{5} \left (b +a \cos \left (d x +c \right )\right )}+\frac {\left (5 a^{6}-9 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{b^{6} a^{2}}-\frac {-3 a^{2}+3 b^{2}}{2 b^{4} \cos \left (d x +c \right )^{2}}+\frac {\left (-5 a^{4}+9 a^{2} b^{2}-3 b^{4}\right ) \ln \left (\cos \left (d x +c \right )\right )}{b^{6}}+\frac {1}{4 b^{2} \cos \left (d x +c \right )^{4}}-\frac {2 a}{3 b^{3} \cos \left (d x +c \right )^{3}}-\frac {2 a \left (2 a^{2}-3 b^{2}\right )}{b^{5} \cos \left (d x +c \right )}}{d}\) | \(200\) |
risch | \(-\frac {i x}{a^{2}}-\frac {2 i c}{a^{2} d}-\frac {2 \left (-12 b^{6} {\mathrm e}^{3 i \left (d x +c \right )}-3 b^{6} {\mathrm e}^{i \left (d x +c \right )}+15 a^{6} {\mathrm e}^{i \left (d x +c \right )}+60 a^{6} {\mathrm e}^{3 i \left (d x +c \right )}+60 a^{6} {\mathrm e}^{7 i \left (d x +c \right )}+90 a^{6} {\mathrm e}^{5 i \left (d x +c \right )}-3 b^{6} {\mathrm e}^{9 i \left (d x +c \right )}+15 a^{6} {\mathrm e}^{9 i \left (d x +c \right )}-27 a^{4} b^{2} {\mathrm e}^{i \left (d x +c \right )}+9 a^{2} b^{4} {\mathrm e}^{i \left (d x +c \right )}-118 a^{4} b^{2} {\mathrm e}^{7 i \left (d x +c \right )}+54 a^{2} b^{4} {\mathrm e}^{3 i \left (d x +c \right )}+45 a^{5} b \,{\mathrm e}^{4 i \left (d x +c \right )}-71 a^{3} b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-182 a^{4} b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+78 a^{2} b^{4} {\mathrm e}^{5 i \left (d x +c \right )}-118 a^{4} b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+15 a^{5} b \,{\mathrm e}^{2 i \left (d x +c \right )}+9 a^{2} b^{4} {\mathrm e}^{9 i \left (d x +c \right )}-71 a^{3} b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+45 a^{5} b \,{\mathrm e}^{6 i \left (d x +c \right )}-27 a^{3} b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-27 a^{4} b^{2} {\mathrm e}^{9 i \left (d x +c \right )}+54 a^{2} b^{4} {\mathrm e}^{7 i \left (d x +c \right )}+15 a^{5} b \,{\mathrm e}^{8 i \left (d x +c \right )}-27 a^{3} b^{3} {\mathrm e}^{8 i \left (d x +c \right )}-12 b^{6} {\mathrm e}^{7 i \left (d x +c \right )}-18 b^{6} {\mathrm e}^{5 i \left (d x +c \right )}\right )}{3 d \,b^{5} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4} a^{2} \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}+a \right )}-\frac {5 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{4}}{b^{6} d}+\frac {9 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{4} d}-\frac {3 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{2} d}+\frac {5 a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{b^{6} d}-\frac {9 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{b^{4} d}+\frac {3 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{b^{2} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{a^{2} d}\) | \(720\) |
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 312, normalized size of antiderivative = 1.74 \[ \int \frac {\tan ^7(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {5 \, a^{3} b^{4} \cos \left (d x + c\right ) - 3 \, a^{2} b^{5} + 12 \, {\left (5 \, a^{6} b - 9 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} \cos \left (d x + c\right )^{4} + 6 \, {\left (5 \, a^{5} b^{2} - 9 \, a^{3} b^{4}\right )} \cos \left (d x + c\right )^{3} - 2 \, {\left (5 \, a^{4} b^{3} - 9 \, a^{2} b^{5}\right )} \cos \left (d x + c\right )^{2} - 12 \, {\left ({\left (5 \, a^{7} - 9 \, a^{5} b^{2} + 3 \, a^{3} b^{4} + a b^{6}\right )} \cos \left (d x + c\right )^{5} + {\left (5 \, a^{6} b - 9 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (a \cos \left (d x + c\right ) + b\right ) + 12 \, {\left ({\left (5 \, a^{7} - 9 \, a^{5} b^{2} + 3 \, a^{3} b^{4}\right )} \cos \left (d x + c\right )^{5} + {\left (5 \, a^{6} b - 9 \, a^{4} b^{3} + 3 \, a^{2} b^{5}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (-\cos \left (d x + c\right )\right )}{12 \, {\left (a^{3} b^{6} d \cos \left (d x + c\right )^{5} + a^{2} b^{7} d \cos \left (d x + c\right )^{4}\right )}} \]
[In]
[Out]
\[ \int \frac {\tan ^7(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\int \frac {\tan ^{7}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{2}}\, dx \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.27 \[ \int \frac {\tan ^7(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {\frac {5 \, a^{3} b^{3} \cos \left (d x + c\right ) - 3 \, a^{2} b^{4} + 12 \, {\left (5 \, a^{6} - 9 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \cos \left (d x + c\right )^{4} + 6 \, {\left (5 \, a^{5} b - 9 \, a^{3} b^{3}\right )} \cos \left (d x + c\right )^{3} - 2 \, {\left (5 \, a^{4} b^{2} - 9 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{2}}{a^{3} b^{5} \cos \left (d x + c\right )^{5} + a^{2} b^{6} \cos \left (d x + c\right )^{4}} + \frac {12 \, {\left (5 \, a^{4} - 9 \, a^{2} b^{2} + 3 \, b^{4}\right )} \log \left (\cos \left (d x + c\right )\right )}{b^{6}} - \frac {12 \, {\left (5 \, a^{6} - 9 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{2} b^{6}}}{12 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1023 vs. \(2 (173) = 346\).
Time = 3.43 (sec) , antiderivative size = 1023, normalized size of antiderivative = 5.72 \[ \int \frac {\tan ^7(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 15.73 (sec) , antiderivative size = 505, normalized size of antiderivative = 2.82 \[ \int \frac {\tan ^7(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (20\,a^5+5\,a^4\,b-31\,a^3\,b^2-4\,a^2\,b^3+8\,a\,b^4+4\,b^5\right )}{a\,b^5}-\frac {2\,\left (15\,a^5+15\,a^4\,b-22\,a^3\,b^2-22\,a^2\,b^3+3\,a\,b^4+3\,b^5\right )}{3\,a\,b^5}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (60\,a^5+45\,a^4\,b-83\,a^3\,b^2-66\,a^2\,b^3+6\,a\,b^4+12\,b^5\right )}{3\,a\,b^5}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (90\,a^5+45\,a^4\,b-127\,a^3\,b^2-56\,a^2\,b^3+6\,a\,b^4+18\,b^5\right )}{3\,a\,b^5}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (a-b\right )\,\left (-5\,a^4-5\,a^3\,b+4\,a^2\,b^2+4\,a\,b^3+b^4\right )}{a\,b^5}}{d\,\left (\left (b-a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\left (5\,a-3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\left (2\,b-10\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (10\,a+2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (-5\,a-3\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a+b\right )}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{a^2\,d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )\,\left (5\,a^4-9\,a^2\,b^2+3\,b^4\right )}{b^6\,d}+\frac {\ln \left (a+b-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )\,{\left (a^2-b^2\right )}^2\,\left (5\,a^2+b^2\right )}{a^2\,b^6\,d} \]
[In]
[Out]